<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><%= __('titLe') %></title>
    <link href="image/favicon.ico" rel="shortcut icon">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_607959_8t0w2txptnj.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/home.css">
    <link rel="stylesheet" href="/css/userInfo.css">
    <link rel="stylesheet" href="css/loading.css">
</head>

<body>
    <div id="app" class="app">
        <%- include('base/header',{lang:lang}); %>
        <section class="container">
                <div class="loading" v-show="!loading">
                    <div class="preloader_4">
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>
                <!-- 轮播 -->
                <div class="width1260 swiperbox">
                    <div class="swiper-container">
                        <!-- 轮播 -->
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <a href="/Details/63">
                                    <img src="image/slider01.jpg" class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                            <div class="swiper-slide">
                                <a href="/Details/60">
                                    <img src="image/slider05.jpg" class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider07.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/PicksPal">
                                        <img src="image/slider07.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider06.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/growth">
                                        <img src="image/slider06.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider04.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a @click="gotohyperdice">
                                        <img src="image/slider04.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(gamelist.length){ %>
                                <% gamelist.forEach((item,index) => { %>
                                    <% if(allMine.length){ %>
                                        <div class="swiper-slide">
                                            <a @click="gotohyperdice">
                                                <img src="<%= item.imageUrl[0] %>" class="img-responsive" alt="轮播1">
                                            </a>
                                        </div>
                                    <% } %>
                                    <% if(!allMine.length){ %>
                                        <div class="swiper-slide">
                                            <a href="/singin">
                                                <img src="<%= item.imageUrl[0] %>" class="img-responsive" alt="轮播1">
                                            </a>
                                        </div>
                                    <% } %>
                                <% })%>
                            <% } %>
                        </div>
                        <!-- 分页器 -->
                        <!-- <div class="swiper-pagination swiperpagination"></div> -->
                        <!-- 左右箭头 -->
                        <div class="swiper-button-next swipernext"></div>
                        <div class="swiper-button-prev swiperprev"></div>
                    </div>
                    <!-- 轮播引导 -->
                    <div class="swiperguidev3">
                        <div class="swiperguidev3-container">
                            <div class="swiperguidev3-item"><%= __('swiperguide1') %></div>
                            <div class="swiperguidev3-item"><%= __('swiperguide2') %></div>
                            <div class="swiperguidev3-item"><%= __('swiperguide3') %></div>
                            <div class="swiperguidev3-item"><%= __('swiperguide4') %></div>
                            <div class="swiperguidev3-item"><%= __('swiperguide5') %></div>
                            <div class="swiperguidev3-item"><%= __('swiperguide6') %></div>
                        </div>
                    </div>
                    <!-- HPScat -->
                    <div class="hpscat">
                        <img src="/image/hpscat.png" alt="hpscat" class="img-responsive"/>
                    </div>
                    <!-- 公告 -->
                    <% if(allannouncement&&allannouncement.length){ %>
                        <div class="newbulletin">
                            <ul>
                                <% allannouncement.forEach((item,index) => { %>
                                    <% if(index==0){ %>
                                        <li class="bulletin-item firstbulletin">
                                            <span class="bulletin-round"></span>
                                            <a href="/Details/<%= item.id %>" class="bulletin-name">
                                                <%= item.title %>
                                            </a>
                                        </li>
                                    <% }else{ %>
                                        <li class="bulletin-item">
                                                <span class="bulletin-round"></span>
                                                <a href="/Details/<%= item.id %>" class="bulletin-name">
                                                    <%= item.title %>
                                                </a>
                                            <span class="bulletin-date" v-html="filtertime(<%= item.publishTime %>)"></span>
                                        </li>
                                    <% } %>
                                <% }) %>
                            </ul>
                        </div>
                    <% } %>
                </div>
                <!-- 热门游戏 -->
                <div class="width1260 hotgamev3">
                    <% if(allMine.length){ %>
                        <div class="hotgamev3-list">
                            <a @click="gotohyperdice">
                                <img src="/image/hotgame1v3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <div @click="gotohyperdice" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle1') %>
                                </div>
                                <div @click="gotohyperdice" class="modelsubtitle">
                                    <%= __('modelsubtitle1') %>
                                </div>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="/tcggame">
                                <img src="/image/hotgame2s3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/tcggame" class="modeltitle <%= lang %>">
                                    <%= __('modeltitle2') %>
                                </a>
                                <a href="/tcggame" class="modelsubtitle">
                                    <%= __('modelsubtitle2') %>
                                </a>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="/PicksPal">
                                <img src="/image/hotgame3s3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/PicksPal" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle3') %>
                                </a>
                                <a href="/PicksPal" class="modelsubtitle">
                                    <%= __('modelsubtitle3') %>
                                </a>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="#">
                                <img src="/image/comingsoon.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="#" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle4') %>
                                </a>
                                <a href="#" class="modelsubtitle">
                                    <%= __('modelsubtitle4') %>
                                </a>
                            </div>
                        </div>
                    <% }else{ %>
                        <div class="hotgamev3-list">
                            <a href="/singin">
                                <img src="/image/hotgame1v3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/singin" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle1') %>
                                </a>
                                <a href="/singin" class="modelsubtitle">
                                    <%= __('modelsubtitle1') %>
                                </a>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="/singin">
                                <img src="/image/hotgame2s3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/singin" class="modeltitle <%= lang %>">
                                    <%= __('modeltitle2') %>
                                </a>
                                <a href="/singin" class="modelsubtitle">
                                    <%= __('modelsubtitle2') %>
                                </a>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="/singin">
                                <img src="/image/hotgame3s3.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/singin" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle3') %>
                                </a>
                                <a href="/singin" class="modelsubtitle">
                                    <%= __('modelsubtitle3') %>
                                </a>
                            </div>
                        </div>
                        <div class="hotgamev3-list">
                            <a href="/singin">
                                <img src="/image/comingsoon.png" class="img-responsive" />
                            </a>
                            <div class="hotgamev3model modeltb">
                                <a href="/singin" class="modeltitle  <%= lang %>">
                                    <%= __('modeltitle4') %>
                                </a>
                                <a href="/singin" class="modelsubtitle">
                                    <%= __('modelsubtitle4') %>
                                </a>
                            </div>
                        </div>
                    <% } %>
                </div>
                <!-- AG亚游导航V3 -->
                <div class="width1260 aggamenavv3">
                    <!-- 楼层名称 -->
                    <div class="gamefloornamev3">
                        <div class="agiconnav">
                            <img src="/image/agicon.png" alt="AG亚游" class="img-responsive agicon" />
                            <% if(lang=='zh_TW'){ %>
                                <img src="/image/aggamezh_TW.png" class="img-responsive" />
                            <% } %>
                            <% if(lang=='zh_CN'){ %>
                                <img src="/image/aggamezh_CN.png" class="img-responsive" />
                            <% } %>
                            <% if(lang=='en_US'){ %>
                                <img src="/image/aggameen_US.png" class="img-responsive" />
                            <% } %>
                        </div>
                    </div>
                    <div class="aggametransform aggametransformv3">
                        <!-- AG导航 -->
                        <div class="aggametit">
                        <!-- 币种切换 -->
                            <div class="aggamechoosecoin">
                                    <div class="aggamechoosecoin-input">
                                        <div class="aggamechoosecoin-select" @click="exchange.isshowcoinarr2=!exchange.isshowcoinarr2">
                                            <img :src="'image/'+exchange.defaultcoin2+'.png'" :alt="exchange.defaultcoin">
                                            <span v-html="exchange.defaultcoin2"></span>
                                            <i class="icon iconfont icon-sanjiaodown"></i>
                                        </div>
                                        <!-- 下拉菜单 -->
                                        <% if(allMine.length){ %>
                                            <div class="dropdownmenu" v-show="exchange.isshowcoinarr2">
                                                <% allMine.forEach( (item,index) => { %>
                                                    <div>
                                                        <div class="dropdownmenu-item coinitem" 
                                                            :class="{selected:'<%- item.coin %>'==exchange.defaultcoin}" 
                                                            @click="changeexchangecoin('<%= item.coin %>','<%= item.balance %>')">
                                                            <img src="image/<%= item.coin %>.png" alt="">
                                                            <span><%= item.coin %></span>
                                                        </div>
                                                     </div>
                                                <% }) %>
                                            </div>
                                        <% } %>
                                </div>
                            </div>
                            <!-- 各币种AG分 -->
                            <div class="myintegral">
                                <div class="integral"><%= __('MyAGpoints') %>&nbsp;</div>
                                <div class="integral-num" v-html="userinfo.myagbanlance"></div>
                            </div>
                        </div>
                        <!-- 兑换积分 -->
                        <div class="transformintegral">
                            <div class="transformhelpbox">
                                <div class="transformhelp">?</div>
                                <div class="transformhelp1 topcenter <%= lang %>"><%= __('AGdivision') %></div>
                            </div>
                            <% if(allMine.length){ %>
                            <div class="transformbtn transformin" @click="changetransform('showtransforminag')"><%= __('ExchangeAGpoints') %></div>
                            <% } %>
                            <% if(!allMine.length){ %>
                            <div class="transformbtn transformin"><a href="/singin"><%= __('ExchangeAGpoints') %></a></div>
                            <% } %>
                        </div>
                    </div>
                </div>
                <!-- AG亚游列表 -->
                <div class="width1260 aggamelistv3 clear">
                    <div class="agbaccaratv3 fl">
                        <div class="baccaratv3name"><%= __('baccarat1') %></div>
                        <div class="baccaratv3-content">
                            <% if(allMine.length){ %>
                            <% baccaratv.forEach((item,index) => { %>
                            <div class="baccaratv3-list" @click="enteraggame('<%- item.code %>')">
                                <div class="hovergamebar">
                                    <span class="baccaratv-listname"><%= JSON.parse(item.name)[lang] %></span>
                                    <span class="hovergamebarbg"></span>
                                </div>
                                <img src="<%= item.imageUrl[0] %>.jpg" alt="<%= __('baccarat1') %>" 
                                class="img-responsive">
                            </div>
                            <% }) %>
                            <% }else{ %>
                            <% baccaratv.forEach((item,index) => { %>
                            <div class="baccaratv3-list">
                                <div class="hovergamebar">
                                    <span class="baccaratv-listname"><%= JSON.parse(item.name)[lang] %></span>
                                    <span class="hovergamebarbg"></span>
                                </div>
                                <a href="/singin">
                                    <img src="<%= item.imageUrl[0] %>.jpg" alt="<%= __('baccarat1') %>" class="img-responsive">
                                </a>
                            </div>
                            <% }) %>
                            <% } %>
                        </div>
                    </div>
                    <div class="aglistv3">
                        <div class="baccaratv3namefloor">
                            <div class="baccaratv3name"><%= __('baccarat2') %></div>
                            <div class="aglistv3-container">
                                <% if(allMine.length){ %>
                                    <a href="/moregame" class="aglistv3moreagname"><%= __('MoreAGgames') %></a>
                                <% } %>
                                <% if(!allMine.length){ %>
                                    <a href="/singin" class="aglistv3moreagname"><%= __('MoreAGgames') %></a>
                                <% } %>
                            </div>
                        </div>
                        <div class="aglist-container">
                            <% if(allMine.length){ %>
                            <% gamerecommend.forEach((item,index) => { %>
                            <div class="aglist-list" @click="enteraggame('<%- item.code %>')">
                                <div class="hovergamebar">
                                    <span class="aglist-name"><%= JSON.parse(item.name)[lang] %></span>
                                    <span class="hovergamebarbg"></span>
                                </div>
                                <img src="<%= item.imageUrl[0] %>zh_CN.jpg" 
                                alt="<%= __('baccarat2') %>" class="img-responsive"/>
                            </div>
                            <% }) %>
                            <% }else{ %>
                            <% gamerecommend.forEach((item,index) => { %>
                            <div class="aglist-list">
                                <div class="hovergamebar">
                                    <span class="aglist-name"><%= JSON.parse(item.name)[lang] %></span>
                                    <span class="hovergamebarbg"></span>
                                </div>
                                <a href="/singin">
                                    <img src="<%= item.imageUrl[0] %>zh_CN.jpg" 
                                    alt="<%= __('baccarat2') %>" class="img-responsive"/>
                                </a>
                            </div>
                            <% }) %>
                            <% } %>
                        </div>
                    </div>
                </div>
                <!-- 兑换遮罩层 -->
                <div class="agconvert-dialog" v-show="showtransforminag||showtransformout">
                    <div class="agconvert-container">
                    <!-- 遮罩层头部 -->
                    <div class="agconvert-header">
                        <div class="agconvert-hitem" :class="{active:showtransforminag==true}"  
                        @click="changetransform('showtransforminag')"><%= __('ExchangeAGpoints') %></div>
                        <div class="agconvert-hitem" :class="{active:showtransformout==true}"
                        @click="changetransform('showtransformout')"><%= __('WithdrawAGpoints') %></div>
                    </div>
                    <!-- 遮罩层选择币种 -->
                    <div class="aggametransform aggametransformv3 agconvert-coinselect">
                        <div class="aggametit">
                        <!-- 币种切换 -->
                            <div class="aggamechoosecoin">
                                                <div class="aggamechoosecoin-input">
                                                    <div class="aggamechoosecoin-select" @click="exchange.isshowcoinarr=!exchange.isshowcoinarr">
                                                        <img :src="'image/'+exchange.defaultcoin+'.png'" :alt="exchange.defaultcoin">
                                                        <span v-html="exchange.defaultcoin"></span>
                                                        <i class="icon iconfont icon-sanjiaodown"></i>
                                                    </div>
                                                    <!-- 下拉菜单 -->
                                                    <% if(allMine.length){ %>
                                                        <div class="dropdownmenu" v-show="exchange.isshowcoinarr">
                                                            <% allMine.forEach( (item,index) => { %>
                                                                <div>
                                                                    <div class="dropdownmenu-item coinitem" 
                                                                        :class="{selected:'<%- item.coin %>'==exchange.defaultcoin}" 
                                                                        @click="changeexchangecoin('<%= item.coin %>','<%= item.balance %>')">
                                                                        <img src="image/<%= item.coin %>.png" alt="">
                                                                        <span><%= item.coin %></span>
                                                                    </div>
                                                                </div>
                                                            <% }) %>
                                                        </div>
                                                    <% } %>
                                            </div>
                                        </div>
                                        <!-- 各币种AG分 -->
                                        <div class="myintegral">
                                            <div class="integral"><%= __('MyAGpoints') %>&nbsp;</div>
                                            <div class="integral-num" v-html="userinfo.myagbanlance"></div>
                            </div>
                        </div>
                    </div>
                    <!-- 兑换AG -->
                    <div class="agconvert-body" v-show="showtransforminag">
                        <div class="agconvertinput">
                            <div class="agconvert-txt <%= lang %>"><%= __('Currencyexchange') %></div>
                            <input type="text" class="agconvert-input" v-model="exchangenum" :disabled="exchange.disexchangenum">
                            <div class="agconvert-coin" v-html="exchange.defaultcoin"></div>
                        </div>
                        <div class="agconvertinput">
                            <div class="agconvert-txt <%= lang %>"><%= __('Youwillget') %></div>
                            <span v-html="exchange.exchangeagcoin" class="agconvert-input"></span>
                            <div class="agconvert-coin"><%= __('AGPoints') %></div>
                        </div>
                        <div class="agconvert-footer">
                            <div class="transformhelpbox">
                                <div class="transformhelp">?</div>
                                <div class="transformhelp1 topcenter <%= lang %>"><%= __('AGdivision') %></div>
                            </div>
                            <div class="agconvert-submit">
                                <button class="ag-sumbit agsumbit-confirm"  @click="confirmexchange" :disabled="exchange.disabledbtn"><%= __('confirmv31') %></button>
                                <button class="ag-sumbit agsumbit-cancel" @click="changetransform('showtransforminag')"><%= __('confirmv32') %></button>
                            </div>
                        </div>
                    </div>
                    <!-- 兑回AG -->
                    <div class="agconvert-body" v-show="showtransformout">
                        <div class="agconvertinput">
                                <div class="agconvert-txt <%= lang %>"><%= __('CashOutpoints') %></div>
                                <input type="text" class="agconvert-input" v-model="cashoutnum">
                                <div class="agconvert-coin"><%= __('AGPoints') %></div>
                            </div>
                            <div class="agconvertinput">
                                <div class="agconvert-txt <%= lang %>"><%= __('Youwillget') %></div>
                                <span v-html="cashout.exchangeagcoin" class="agconvert-input"></span>
                                <div class="agconvert-coin" v-html="exchange.defaultcoin"></div>
                            </div>
                            <div class="agconvert-footer">
                                <div class="transformhelpbox">
                                    <div class="transformhelp">?</div>
                                    <div class="transformhelp1 topcenter <%= lang %>"><%= __('AGdivision') %></div>
                                </div>
                                <div class="agconvert-submit">
                                    <button class="ag-sumbit agsumbit-confirm"  @click="confircashout" :disabled="cashout.disabledbtn"><%= __('confirmv31') %></button>
                                    <button class="ag-sumbit agsumbit-cancel" @click="changetransform('showtransformout')"><%= __('confirmv32') %></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        <%- include('base/footer'); %>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.2/js/swiper.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="js/home.js"></script>
</body>

</html>